
{{- if .Site.Menus.footer -}}
<ul class="nav justify-content-between footer-memu mb-3 row">
  {{- range .Site.Menus.footer -}}
  <li class="nav-item col-12 col-md-6 col-lg-3 px-0">
    {{- if .HasChildren -}}
    <ul class="nav flex-column align-items-start">
      <li class="nav-item w-100">
      {{- template "footer-menu-item" (dict "item" . "class" "nav-link fw-bold fs-lg") -}}
      </li>
      {{- range .Children -}}
        {{- if .Params.divider -}}
        <li><hr class="dropdown-divider"></li>
        {{- else -}}
        <li class="nav-item w-100">
          {{- template "footer-menu-item" (dict "item" .) -}}
        </li>
        {{- end -}}
      {{- end -}}
    </ul>
    {{- else -}}
    <li class="nav-item w-100">
      {{- template "footer-menu-item" (dict "item" .) -}}
    </li>
    {{- end -}}
  </li>
  {{- end -}}
</ul>
{{- end -}}

{{- define "footer-menu-item" -}}
{{- $class := default "nav-link text-nowrap overflow-hidden" .class -}}
{{- $title := partial "helpers/menu-name" .item }}
{{- if .item.URL -}}
<a class="{{ $class }}" title="{{ $title }}"
  href="{{ .item.URL }}"{{ if not .item.Page }} target="_blank" rel="noopener noreferrer"{{ end }}>
  {{- $title -}}
</a>
{{- else -}}
<a class="{{ $class }}" href="javascript: void(0);">{{ $title }}</a>
{{- end -}}
{{- end -}}
